const asyncRead = require('./asyncRead');

const test = () => {
  asyncRead('testfs').then(data => {
    console.log('asyncRead ok :', data);
  }).catch(err => {
    console.log('asyncRead err :', err);
  });
};

test();
console.log('test end');

/**
 * 分步骤执行
 */
// const test = () => {
//   const a = asyncRead('testfs');
//   console.log('a end');
//   const b = a.then(data => {
//     console.log('asyncRead ok :', data);
//   });
//   console.log('b end');
//   const c = b.then(ret => {
//     const bb = b;
//     console.log('ret :', ret);
//   });
//   console.log('c end');
// };
// test();
// console.log('test end');
